/**
 * 
 */
package com.rio.dandan.dao.impl;

import java.util.List;

import com.rio.dandan.dao.DaoSupport;
import com.rio.dandan.dao.UserVideoDao;
import com.rio.dandan.pojo.UserVideo;

/**
 *
 * UserVideoDaoImpl.java
 *
 * @author 宋陆
 * @version 1.0 2014年5月22日
 */
public class UserVideoDaoImpl extends DaoSupport implements UserVideoDao {

    /**
     * @see com.rio.dandan.dao.UserVideoDao#getUserVideo(java.lang.String)
     */
    @Override
    public UserVideo getUserVideo(String fileName) {
        return get(UserVideo.class, fileName);
    }

    /**
     * @see com.rio.dandan.dao.UserVideoDao#findUserVideo(java.lang.String)
     */
    @SuppressWarnings("unchecked")
    @Override
    public List<UserVideo> findUserVideo(String uid) {
        final String hql = "from UserVideo where Status<>-1 and Uid=?";
        Object[] params = new Object[] { uid };
        List<UserVideo> list = find(hql, params, true);
        return list;
    }

}
